package com.qf;

import com.alibaba.druid.pool.DruidDataSource;
import org.apache.ibatis.datasource.pooled.PooledDataSourceFactory;

/**
 * @version 1.0
 * @auther Administrator
 * @date 2023/2/3 16:27
 */
public class MyDruidDataSourceFactory extends PooledDataSourceFactory {

    /**
     *             <dataSource type="org.apache.ibatis.datasource.pooled.PooledDataSourceFactory">
     *             </dataSource>
     *
     *          org.apache.ibatis.datasource.pooled.PooledDataSourceFactory:包名+类名
     *          让包名+类名创建PooledDataSourceFactory 底层是反射
     *
     *          反映的应用：
     *          创建对象有几种方式？
     *          1、new PooledDataSourceFactory
     *          2、反射
     *           构造器
     *        <dataSource type="com.qf.MyDruidDataSourceFactory">
     *      *  </dataSource>
     */

    public MyDruidDataSourceFactory(){
        //Druid连接池
        this.dataSource = new DruidDataSource();
    }

}
